<?php
/*
 * Created on Feb 11, 2011
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */

include_once("../configure/admin.config.inc.php");	//--> admin global var
include_once("db.inc.php");							//--> db global var
include_once("Common.php");							//--> Common

$objCommon	= new Common();			//--> Common

if(isset($_POST['Submit'])){
	$a	= $_POST['a'];
	$b	= $_POST['b'];
	
	
	$isReturn = $objCommon->update(DB_TAG_COUPON, "INSERT INTO test set a='$a', b='$b'");
	if($isReturn){
		$error_message = 'add successfully.';
		
	}else 
		$error_message = 'add failure.';
	
}else
	$error_message = 'invalid submit';

echo $error_message;


//	$sql		= "SELECT name FROM category limit 10";
//	$allData 	= $objCommon->getAllData(DB_TAG_COUPON, $sql);
//	
//	echo '===count = ' . count($allData) . '<br>';
//	foreach($allData as $arrRow){
//		echo '===name = ' . $arrRow['name'] . '<br>';
//	
//	}

?>
